package com.qf.j2112.service.impl;

import com.alipay.api.AlipayApiException;
import com.qf.j2112.alipay.AlipayOrder;
import com.qf.j2112.alipay.AlipayTool;
import com.qf.j2112.service.AliPayService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.servlet.http.HttpServletRequest;

/**
 * @Auther: jeffrey
 * @Date: 2022/03/13/21:56
 * @Description: 支付service 实现类
 */
@Service
public class AliPayServiceImpl implements AliPayService {

    @Autowired
    private AlipayTool alipay;

    @Override
    public String aliPay(AlipayOrder order) throws AlipayApiException {
        return alipay.pay(order);
    }

    @Override
    public boolean checkSign(HttpServletRequest request) {
        boolean b = alipay.checkSign(request);
        return b;
    }
}
